// test_network.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

#include <iostream>
#include <boost/asio.hpp>

using namespace std;
using boost::asio::ip::tcp;
using boost::asio::ip::udp;

int _tmain(int argc, _TCHAR* argv[])
{
	//CoInitialize(NULL);
	boost::asio::io_service io_service;
	
	udp::endpoint endpoint(udp::v4(), 10002);

	//udp::socket sock(io_service, endpoint);
	udp::socket sock(io_service);
	sock.open(udp::v4());

	boost::system::error_code error;
	sock.bind(endpoint, error);
	int i = boost::asio::error::bad_descriptor;
	if(!error)
	{
		cout << "how" << endl;
	}

	//CoUninitialize();
	return 0;
}

